package security.session;

import java.io.IOException;
import javax.servlet.ServletException;
import org.springframework.security.web.session.SessionInformationExpiredEvent;
import org.springframework.security.web.session.SessionInformationExpiredStrategy;

/**
 * session过期策略
 * @author majie
 *
 */
public class MyExpiredSessionStrategy implements SessionInformationExpiredStrategy{

	@Override
	public void onExpiredSessionDetected(SessionInformationExpiredEvent eventØ) throws IOException, ServletException {
		eventØ.getResponse().setContentType("application/json;charset=UTF-8");
		eventØ.getResponse().getWriter().write("并发登录");
	}

}
